import vue from '@vitejs/plugin-vue'

export default {
    open: false, //自动打开 
    base: './',
    plugins: [vue()],
    optimizeDeps: {
        include: ['schart.js']
    },
  // 跨域
  server: {
    cors: true, // 默认启用并允许任何源
    host: '127.0.0.1',
    port: 3000,
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:8888',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
    }
  }
}